// 分页
<template>    
  <div class="block">
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="listQuery.page"
      :page-size="listQuery.limit"
      layout="total, sizes, prev, pager, next, jumper"
      :total="listQuery.total">
    </el-pagination>
  </div>
</template>

<script>
  export default {
    name: 'pagination',
    props: ['listQuery'],
    methods: {
      handleSizeChange(val) {
        this.listQuery.limit = val
        // console.log(this.listQuery.limit)
      },
      handleCurrentChange(val) {
        this.listQuery.page = val
        // console.log(this.listQuery.page)
      }
    },
    data() {
      return {
        currentPage: 4
      }
    }
  }
</script>